package week07

import "bytes"

// 709. 转换成小写字母
// https://leetcode-cn.com/problems/to-lower-case/

func toLowerCase(s string) string {
	buf := &bytes.Buffer{}
	for i := range s {
		if s[i] >= 'A' && s[i] <= 'Z' {
			buf.WriteByte(s[i]+32)
		} else {
			buf.WriteByte(s[i])
		}
	}
	return buf.String()
}